<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h2>
            {{person.name}}--{{person.age}}
        </h2>
        <h3>
            {{person.fav}}
        </h3>

        <ul>
            <li>1</li>
        </ul>
        <h3>{{msg}}</h3>
        <div v-text='msg'></div>
        <div v-html='htmlStr'></div>
        <input type="text" v-model='msg'>
        <button v-on:click='clictBtn'>on点击</button>
        <button @click='clictBtn'>@点击</button>


    </div>
    <script src="./Observer.js"></script>
    <script src="MVue.js"></script>
    <!-- <script src="Vue.js"></script> -->
    <script>
        let vm = new MVue({
            el:'#app',
            data:{
                person:{
                    name:'宋鹏飞',
                    age:18,
                    fav:'这条街最亮的仔'
                },
                msg:'学习MVVM实现原理',
                htmlStr:'<h1>v-html的绑定</h1>'
            },
            methods:{
                clictBtn(){
                    console.log(this)
                    this.person.name = 'song'
                    // this.$data.person.name = 'song'
                }
            }
        })
    </script>
</body>
</html>